package javaClassExercise.aboutNull;

/**
 * Created by lomo on 2017/3/26.
 *
 * instanceof运算符
 */
public class AboutNull {
    public static void main(String[] args) {
        Integer iAmNull = null;
        if(iAmNull instanceof Integer){
            System.out.println("iAmNull is instance of Integer");

        }else{
            System.out.println("iAmNull is NOT an instance of Integer");
        }

        //输出：
        //iAmNull is NOT an instance of Integer
        //Why?
        /*
        iAmNull是引用类型变量，且其值为null，
         */
    }
}
